<?php session_start(); ?>
<script type="text/javascript">
	<?php
		if(isset($_SESSION['user']))
			echo 'window.location.href = "home.php";';
		else
			echo 'window.location.href = "login.php";';
	?>
</script>